package infostroy.bookagolf.components.panels;

import infostroy.bookagolf.common.Constants.Colors;
import infostroy.bookagolf.components.borders.RoundedBorder;

import javax.swing.*;
import java.awt.*;

/**
 * Created by valer_000 on 2/16/14.
 */
public class GolfRoundPanel extends JPanel {

    public GolfRoundPanel() {
        this.setBorder(new RoundedBorder());
    }

    @Override
    protected void paintComponent(Graphics g) {
        Graphics2D graphics = (Graphics2D) g;
        graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        graphics.setColor(Colors.WHITE);
        graphics.fillRoundRect(0, 0, this.getWidth(), this.getHeight(), 10, 10);
    }
}
